<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Cache-Control"  content="no-transform">
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>中奖记录</title>
    <link href="/statics/view/css/yy_common.css" rel="stylesheet">
    <link href="http://mimg.127.net/p/yymobile/1511072243/css/user.css" rel="stylesheet">
</head>
<body>
<div class="m-user">
    <div class="m-simpleHeader" id="dvHeader">
        <a href="/db" data-pro="back" data-back="true" class="m-simpleHeader-back"><i class="ico ico-back"></i></a>
        <h1>中奖记录</h1>
    </div>
    <div class="m-user-duobaoRecord" id="duobaoRcd_dvWrapper">
        <div id="pro-view-6">
            <div data-pro="loading"></div>
            <ul class="w-goodsList w-goodsList-l m-user-goodsList" data-pro="list">
                [#list orderList as order]
                <li class="w-goodsList-item" id="pro-view-8">
                    <div class="w-goods w-goods-l w-goods-ing m-user-goods">
                        <div class="w-goods-pic">
                            <a href="/db/product-${order.dbProduct.id}-${order.dbTimes.timesNo}">
                                <img alt="${order.dbProduct.name}" src="${order.dbProduct.medium}" onerror="" class="">
                            </a>
                        </div>
                        <div class="w-goods-info">
                            <p class="w-goods-title f-txtabb">
                                <a href="/db/product-${order.dbProduct.id}-${order.dbTimes.timesNo}.html">${order.dbProduct.name}</a>
                            </p>
                            <p class="w-goods-price">总需：${order.dbTimes.quantity} 人次</p>
                            <p class="w-goods-period">期号：${order.dbTimes.timesNo}</p>
                            [#if order.dbTimes.isLetty]
                                <div class="m-user-goods-owner m-user-box">
                                    <div class="m-user-box-name">获得者：</div>
                                    <div class="m-user-box-cont"><a href="">${order.dbTimes.lotteryMobileInfo}</a>
                                    </div>
                                </div>
                                <p class="m-user-goods-code">幸运号码：<span class="txt-impt">${order.dbTimes.timesCode}</span></p>
                                <p class="m-user-goods-time">揭晓时间：${order.dbTimes.endDate?string("yyyy-MM-dd HH:mm:ss")}</p>
                                [#else]
                                  <p class="m-user-goods-time" style="color: #cc0000;">尚未揭晓</p>
                            [/#if]
                            <div class="m-user-goods-my">
                                本期参与：<span class="txt-impt">${order.quantity}</span>人次<a class="link showMyCode" data-id="${order.id}"  href="javascript:void(0);" data-pro="mycode">查看我的号码</a>
                            </div>
                        </div>
                        <div class="w-goods-shortFunc">
                        </div>
                    </div>
                </li>
                [/#list]
            </ul>
            <div data-pro="more">
                <div class="w-more" id="pro-view-10">
                    <div data-pro="link" style="display: none;"><a href="javascript:void(0);">上拉加载更多</a></div>
                    <div data-pro="loading" style="display: none;"><b class="ico ico-loading"></b> 努力加载中</div>
                    <div data-pro="disable">对不起，没有您的中奖记录</div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="//cdn.bootcss.com/jquery/2.1.0/jquery.min.js"></script>
<script type="text/javascript" src="/statics/layer.m/layer.m.js"></script>
<script type="text/javascript">
    $(function(){
        $(".showMyCode").click(function(){
            var orderId=$(this).attr("data-id");
            $.ajax({
                url: "/member/dbRecord/getCode",
                type: "GET",
                data: {
                    orderId : orderId
                },
                dataType: "json",
                cache: false,
                success: function(message) {
                    layer.open({
                        content: message.content,
                        time: 2
                    });
                },error:function(){
                    layer.open({
                        content: "服务器异常",
                        time: 2
                    });
                }
            });
            return false;
        });
    });
</script>
</body>
</html>